<?php

class Instructor extends Model {
	
	function Instructor()
	{
		parent::Model();
	}

	function select($subject)
	{
		$this->db->where('Subject',$subject);
		$this->db->from('SubjectInstructor');
		$query = $this->db->get();
		return $query;
	}

	function delete($id)
	{
		$this->db->delete('SubjectInstructor', array('InstructorID'=>$id));
		return TRUE;
	}

	function add($array)
	{
		$this->db->insert('SubjectInstructor', $array);
		return true;
	}

	function authenticate($array)
	{
		$this->db->where($array);
		$query = $this->db->get('SubjectInstructor');
		return $query->num_rows();
	}
}

?>
